//
//  NSLayoutConstraint+FF.m
//  BeeNewDemo
//
//  Created by 付顺龙 on 2018/6/4.
//  Copyright © 2018年 Bilos. All rights reserved.
//

#import "NSLayoutConstraint+FF.h"
#import <objc/runtime.h>
@implementation NSLayoutConstraint (FF)

-(BOOL)adapterScreen {
    return true;
}
-(void)setAdapterScreen:(BOOL)adapterScreen {
    if (adapterScreen) {
        
        switch (self.firstAttribute) {
            case NSLayoutAttributeTop:
            case NSLayoutAttributeBottom:
            case NSLayoutAttributeTopMargin:
            case NSLayoutAttributeBottomMargin:
//                self.constant = self.constant * ScaleY;
//                break;
            case NSLayoutAttributeLeft:
            case NSLayoutAttributeRight:
            case NSLayoutAttributeLeading:
            case NSLayoutAttributeTrailing:
            case NSLayoutAttributeLeftMargin:
            case NSLayoutAttributeRightMargin:
            case NSLayoutAttributeTrailingMargin:
            case NSLayoutAttributeWidth:
            case NSLayoutAttributeHeight:
                self.constant = self.constant * ScaleX;
                break;
            default:
                break;
        }
    }
}

@end
